package com.nts.bupna.model;

public class Invoke implements Typed, HasInput, HasOutput, Activity {

    public enum MethodType {
        STATIC, INSTANCE
    }

    private String type;
    private String method;
    private String var;
    private String result;
    private MethodType methodType;
    private String service;
    private String vars;

    @Override
    public String getType() {
        return type;
    }

    @Override
    public void setType(final String type) {
        this.type = type;
    }

    @Override
    public String getVar() {
        return var;
    }

    @Override
    public void setVar(final String var) {
        this.var = var;
    }

    @Override
    public void setVars(String vars) {
        this.vars = vars;
    }

    public String getVars() {
        return vars;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(final String method) {
        this.method = method;
    }

    @Override
    public String getResult() {
        return result;
    }

    @Override
    public void setResult(final String result) {
        this.result = result;
    }

    public MethodType getMethodType() {
        return methodType;
    }

    public void setMethodType(final String methodType) {
        this.methodType = MethodType.valueOf(methodType.toUpperCase());
    }

    @Override
    public ActivityType getActivityType() {
        return ActivityType.INVOKE;
    }

    public String getService() {
        return service;
    }

    public void setService(final String service) {
        this.service = service;
    }

    @Override
    public String toString() {
        return "Invoke [type=" + type + ", method=" + method + ", var=" + var + ", result=" + result + ", methodType="
        + methodType + ", service=" + service + "]";
    }
}